Techniques for Surfacing Host-Side Flash Storage Capacity to Virtual Machines

ABSTRACT

Techniques for surfacing host-side flash storage capacity to a plurality of VMs running on a host system are provided. In one embodiment, the host system creates, for each VM in the plurality of VMs, a flash storage space allocation in a flash storage device that is locally attached to the host system. The host system then causes the flash storage space allocation to be readable and writable by the VM as a virtual flash memory device.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.13/748,247 filed on Jan. 23, 2013 and entitled “Techniques forAllocating and Surfacing Host-Side Flash Storage Capacity to VirtualMachines”, which is incorporated by reference in its entirety for allpurposes.

BACKGROUND

In virtualized environments, it is becoming increasingly common for hostsystems that run virtual machines (VMs) to include one or more locallyattached (i.e., “host-side”) flash storage devices. For example, onetype of host-side flash storage device is a solid-state disk (SSD) orPCIe flash card that is installed within the chassis of a host system.Another type of host-side flash storage device is an external flashdrive or appliance that is directly connected to a host system via aperipheral interface.

Generally speaking, host-side flash storage devices supportsignificantly lower read/write latencies and higher bandwidth thanbackend storage arrays that a host system accesses over a network (e.g.,Fibre channel, Ethernet, etc.). There are a number of reasons for thisimproved performance. First, backend storage arrays typically mustservice read/write requests from multiple host systems, and each backendstorage array has finite queues that affect the amount ofbandwidth/latency that the array can support for a particular hostsystem. Second, storage networks may include active elements such asswitches or routers that increase latencies between network endpoints(e.g., host systems and backend storage devices). Thus, host-side flashstorage devices are better suited for caching/storing data that VMsrunning on the host system need to access frequently and rapidly.Unfortunately, existing virtualization platforms do not provide amechanism for automatically allocating and surfacing (i.e., makingaccessible/visible) portions of a host-side flash storage device to VMsso that the VMs can take advantage of the device's low latencycharacteristics. Further, existing virtualization platforms cannotoptimize allocations of surfaced flash storage capacity among VMs inresponse to changing conditions on the host system.

SUMMARY

Techniques for surfacing host-side flash storage capacity to a pluralityof VMs running on a host system are provided. In one embodiment, thehost system creates, for each VM in the plurality of VMs, a flashstorage space allocation in a flash storage device that is locallyattached to the host system. The host system then causes the flashstorage space allocation to be readable and writable by the VM as avirtual flash memory device.

The following detailed description and accompanying drawings provide abetter understanding of the nature and advantages of particularembodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a block diagram of a system environment that supports thesurfacing of host-side flash storage capacity to VMs as virtual flashmemory devices according to one embodiment.

FIG. 2 depicts a flow within the system environment of FIG. 1 forsurfacing host-side flash storage capacity to a VM at the time ofprovisioning and powering on the VM according to one embodiment.

FIG. 3 depicts a flow within the system environment of FIG. 1 forfreeing a host-side flash storage space allocation for a VM when the VMis suspended or snapshotted according to one embodiment.

FIG. 4 depicts a flow within the system environment of FIG. 1 forallocating a new host-side flash storage space allocation for a VM whenthe VM is resumed according to one embodiment.

FIG. 5 depicts a flowchart that provides additional details regardingthe flow of FIG. 2 according to one embodiment.

FIG. 6 depicts a flowchart that provides additional details regardingthe flow of FIG. 3 according to one embodiment.

FIG. 7 depicts a flowchart that provides additional details regardingthe flow of FIG. 4 according to one embodiment.

FIG. 8 depicts a flowchart of a process for freeing a host-side flashstorage space allocation for a VM when the VM is powered off accordingto one embodiment.

FIG. 9 depicts a flowchart of a process for migrating a host-side flashstorage space allocation for a VM when the VM is moved from one hostsystem to another host system according to one embodiment.

DETAILED DESCRIPTION

In the following description, for purposes of explanation, numerousexamples and details are set forth in order to provide an understandingof various embodiments. It will be evident, however, to one skilled inthe art that certain embodiments can be practiced without some of thesedetails, or can be practiced with modifications or equivalents thereof.

Particular embodiments provide techniques for surfacing host-side flashstorage capacity to VMs as virtual flash memory (VFM) devices. In oneembodiment, upon powering on a particular VM, a host system canautomatically allocate space for the VM in a host-side flash storagedevice. The size of this flash storage space allocation can be based on,e.g., a parameter that a user/system administrator specifies at the timeof VM provisioning. The host system can then surface, or makeaccessible, the flash storage space allocation as a VFM device to theVM, such that the VM can read from and write to the flash storage spaceallocation via the VFM device. Applications running in the VM canleverage the VFM device in various ways to take advantage of the lowlatency characteristics of the host-side flash storage device.

In certain embodiments, the host system can dynamically manage thehost-side flash storage space that it allocates/surfaces to VMs so thatinactive (e.g., suspended or powered off) VMs do not consume any spaceon the host-side flash storage device. For example, when a VM issuspended or powered off, the host system can free the flash storagespace allocated to that VM, which the host system can re-allocate foruse by other VMs. When the VM is subsequently resumed or powered on, thehost system can allocate a new portion of the host-side flash storagedevice to the VM per the VM's requirements. In this manner, the hostsystem can ensure that each VM only consumes host-side flash storagecapacity when actually needed (i.e., when the VM is actively running),and thus can optimize the sharing of this capacity across multiple VMs.

In further embodiments, as part of the process of freeing andre-allocating the host-side flash storage space for a VM upon VMsuspend/resume and VM power off/power on, the host system can treat theVFM device for the VM as a non-volatile memory device or a volatilememory device. In the former case, the host system can save the datastored in the VM's flash storage allocation to a backend storage device(e.g., a hard disk-based storage array) when the VM is either suspendedor powered off. The host system can then restore the saved data to theVM's new flash storage allocation when the VM is resumed or powered on.With this approach, the VM has the illusion that the data in the VFMdevice is persistent across both VM suspend and VM power cycles (likeany other typical storage device).

In the latter case, the host system can only save/restore the data inthe VM's flash storage allocation to/from the backend storage devicewhen the VM is suspended and resumed. The host system does not performthis save/restore process when the VM is powered off and on, which meansthat the data in the VM's flash storage allocation is lost during a VMpower cycle. With this approach, the VM has the illusion that the VFMdevice corresponds to a tier of volatile memory (e.g., RAM). Since theVFM device is capable of acting as a volatile memory device (from a VMlifecycle perspective), it is referred to as a virtual flash “memory”device (rather than a virtual flash “storage” device). However, asdescribed in further detail below, the VM can access the VFM device viaa standard, block-based protocol (e.g., SCSI).

FIG. 1 depicts a system environment 100 that supports the surfacing ofhost-side flash storage capacity to VMs as VFM devices according to anembodiment. As shown, system environment 100 includes a host system 102that executes virtualization software 104. Virtualization software 104(also known as a “hypervisor”) is a software layer that comprises anumber of virtual machine monitors (VMMs) 106(1)-106(N). Each VMM106(1)-106(N) provides a virtual hardware environment in which acorresponding VM 108(1)-108(N) can run.

In one embodiment, virtualization software 104 can interact directlywith the physical hardware platform of host system 102 without anintervening host operating system. In this embodiment, virtualizationsoftware 104 can further comprise a kernel (not shown) that manages VMMaccess to the various physical hardware devices of host system 102. Inan alternative embodiment, virtualization software 104 can be part of a“hosted” configuration in which virtualization software 104 runs on topof a host operating system (not shown). In this embodiment,virtualization software 104 can rely on the host operating system forresource management of physical hardware devices. One of ordinary skillin the art will recognize various modifications and alternatives for thedesign and configuration of virtualization software 104.

System environment 100 also includes a central management server (CMS)110 and a backend storage component 112 that communicate with hostsystem 102 via one or more networks 114. CMS 110 can perform variousmanagement tasks with respect to host system 102, such as VM lifecyclemanagement, hardware monitoring, load balancing, and so on. Althoughonly a single host system is shown in FIG. 1, it should be appreciatedthat CMS 110 can simultaneously manage a large number of host systems(each comprising multiple VMs), such as all of the host systems in avirtual infrastructure cluster. It should also be appreciated that CMS110 can be federated to manage a large number of host systems that arescattered across different data centers (possibly in differentgeographic locations).

Backend storage component 112 is typically a hard-disk based storagearray and can store virtual disk files (known as “VMDKs”) and otherpersistent files that host system 102 and/or CMS 110 read from/write toduring their runtime operation.

In the embodiment of FIG. 1, host system 102 is attached to a flashstorage device 116. In one embodiment, flash storage device 116 can be alocally attached (i.e., host-side) device such as, e.g., an SSD, a PCIeflash card, a flash drive/appliance, or the like. In another embodiment,flash storage device 116 can be a network-attached device (via, e.g., astorage fabric/network). In yet another embodiment, flash storage device116 can be a “host-shared” device, such that it is shared among multiplehost systems. As noted in the Background section, it is desirable forVMs 108(1)-108(N) to have VM-aware access to flash storage device 116 sothat applications running in VMs 108(1)-108(N) can take advantage of thedevice's low latency read/write capabilities.

To enable this functionality, VMMs 106(1)-106(N) can each include a VFMmodule 118(1)-118(N). As discussed in further detail below, each VFMmodule 118(1)-118(N) can, at the time of initially powering on acorresponding VM 108(1)-108(N), automatically allocate a portion offlash storage device 116 to the VM (shown as VFM allocations120(1)-120(N)). In one embodiment, flash storage device 116 can beformatted with a logical volume manager or a flash friendly file systemthat enables the VFM module to create the VFM allocation as a file ondevice 116. The VFM module can then interoperate with its VMM to surfacethat allocated portion as a virtual flash memory, or VFM, device to theVM (shown as VFM devices 122(1)-122(N)). This allows applicationsrunning in the VM to view and interact with (e.g., read from and writeto) flash storage device 116 via the surfaced VFM device.

In addition, each VFM module 118(1)-118(N) can, at the time ofsuspending, snapshotting, or powering off a corresponding VM108(1)-108(N), free the VM's VFM allocation in flash storage device 116so that it can be used for other purposes while the VM is inactive. Whenthe VM is resumed or powered back on, the VFM module can re-allocate newspace in flash storage device 116 for the VM per the VM's requirements.This gives the VM the impression that it has persistent access to itsVFM device (when, in fact, it does not). In one embodiment, the VFMmodule can treat the VM's VFM device/VFM allocation as non-volatilememory, and thus backup the data stored in the VFM allocation to backendstorage 112 upon VM suspend or VM power off. In an alternativeembodiment, the VFM module can treat the VM's VFM device/VFM allocationas volatile memory, and thus allow the data stored in the VFM allocationto be discarded upon VM power off.

FIG. 2 depicts a flow 200 within system environment 100 for surfacing aportion of flash storage device 116 to a VM at the time of provisioningand powering on the VM according to an embodiment. At step (1) of flow200 (reference numeral 202), CMS 110 can provision a new VM (e.g., VM108(1)) for deployment on host system 102. As part of this step, CMS 110can receive from, e.g., a system administrator, a parameter indicated adesired VFM allocation size for VM 108(1). In one embodiment, CMS 110can store this parameter, along with other VM configuration information,in an appropriate VM metadata file (e.g., a .VMX file).

At step (2) (reference numeral 204), CMS 110 can transmit a command tovirtualization software 104 running on host system 102 to power on VM108(1). In response, virtualization software 104 can cause VMM 106(1) toinitiate a power on process for VM 108(1). As part of this power onprocess, VFM module 118(1) of VMM 106(1) can allocate a portion of flashstorage device 116 for VM 108(1) in the form of VFM allocation 120(1)(step (3); reference numeral 206). VFM module 118(1) can determine thesize of VFM allocation 120(1) based on, e.g., the user-defined VFMallocation size parameter received at step (1).

Once VFM module 118(1) has created VFM allocation 120(1), VFM module118(1) can (in conjunction with VMM 106(1)) surface, or make accessible,VFM allocation 120(1) to VM 108(1) as a VFM device 122(1) (step (4);reference numeral 208). In other words, VFM module 118(1)/VMM 106(1) cancause VFM allocation 120(1) to be presented in VM 108(1) as VFM device122(1), such that applications running in VM 108(1) can read from, andwrite to, VFM allocation 120(1) via VFM device 122(1). CMS 110 and hostsystem 102 can then repeat the steps of flow 200 to provision and poweron additional VMs 108(2)-108(N), each having a surfaced VFM device122(2)-122(N) corresponding to a VFM allocation 120(2)-120(N) in flashstorage device 116. In this way, host system 102 can automatically sharethe storage space of flash storage device 116 among VMs 108(1)-108(N)and make that space available within each VM.

Although not shown in FIG. 2, CMS 110 and host system 102 can carry outa flow that is similar to flow 200 for creating and surfacing VFMallocation 102(1) to VM 108(1) when VM 108(1) is already provisioned andpowered on (this is referred as a “hot plug” scenario). In the hot plugscenario, CMS 110 can transmit a VFM configuration command tovirtualization software 104 while VM 108(1) is running. The VFMconfiguration command can include, e.g., a request to add a new VFMdevice to VM 108(1) (along with a user-defined allocation size). VFMmodule 118(1) can then create VFM allocation 120(1) based on theuser-defined size and surface VFM allocation 120(1) to VFM 108(1) persteps (3) and (4) of flow 200. In certain embodiments, the VFMconfiguration command can also include a “delete” command for removingan existing VFM allocation for VM 108(1). In the case of either adding anew VM allocation or deleting an existing VFM allocation, CMS 110 canrecord the change in a metadata file for VM 108(1) (i.e., the .VMX filenoted above) when the processing completes successfully.

FIGS. 3 and 4 depict flows 300 and 400 respectively that can beperformed after flow 200 of FIG. 2 for suspending/snapshotting VM 108(1)and subsequently resuming VM 108(1) according to an embodiment. At step(1) of flow 300 (reference numeral 302), CMS 110 can transmit a commandto virtualization software 104 to suspend, or create a snapshot of, VM108(1). In various embodiments, CMS 110 can transmit this command inresponse to, e.g., input from a system administrator or an automatedprocess/agent.

Upon receiving the suspend/snapshot command, virtualization software 104can cause VMM 106(1) to initiate a suspend/snapshot process for VM108(1). As part of this suspend/snapshot process, VFM module 118(1) cansave the data stored in VFM allocation 120(1) to backend storage 112(step (2); reference numeral 304). This saving process is shown viaarrow 308. VFM module 118(1) can then free VFM allocation 120(1), suchthat the flash storage capacity associated with VFM allocation 120(1) ismade available for other purposes (step (3); reference numeral 306). Asa result, VM 108(1) will not consume any storage space in flash storagedevice 116 while VM 108(1) remains in a suspended or snapshotted state.

Turning now to flow 400 of FIG. 4, at a later point in time, CMS 110 cantransmit a command to virtualization software 104 to resume VM 108(1)(step (1) of flow 400; reference numeral 402)). Upon receiving theresume command, virtualization software 104 can cause VMM 106(1) toinitiate a resume process for VM 108(1), which in turn causes VFM module118(1) to create a new VFM allocation 408(1) for VM 108(1) in flashstorage device 116 (step (2); reference numeral 404). To determine thesize of new VFM allocation 408(1), VFM module 118(1) can refer to thesame user-defined VFM allocation size parameter described at step (2) offlow 200.

Finally, at step (3) of flow 400 (reference numeral 404), VFM module118(1) can restore, or transfer over, the VFM data previously saved tobackend storage 112 to new VFM allocation 408(1), thereby essentiallyrecreating the state of original VFM allocation 120(1) in flash storagedevice 116. This data transfer is shown via arrow 408. Once the VMresume process is complete, VM 108(1) can access new VFM allocation408(1) (which contains all of the data previously stored in original VFMallocation 120(1)) via VFM device 122(1).

By freeing and re-creating the VFM allocation for VM 108(1) per flows300 and 400, VFM module 118(1) can prevent VM 108(1) from unnecessarilytying up storage space in flash storage device 116 when the VM is notactively running (e.g., suspended or snapshotted). Thus, this approachcan optimize the usage of flash storage device 116 across VMs108(1)-108(N). Further, by saving and restoring the data stored in VFMallocation 120(1) to/from backend storage 112, VFM module 118(1) canensure that this data is still available to VM 108(1) via VFM device122(1) when VM 108(1) is resumed.

As noted previously, in certain embodiments, VFM module 118(1) can treatVFM device 122(1) of VM 108(1) as either a non-volatile memory device ora volatile memory device. The classification of VFM device 122(1) as anon-volatile memory device or a volatile memory device can depend on,e.g., a parameter that a system administrator defines at the time ofprovisioning VM 108(1). In the embodiment where VFM module 118(1)considers VFM device 122(1) to be a non-volatile memory device, VFMmodule 118(1) can carry out flows that are substantially similar tosuspend/snapshot flow 300 and resume flow 400 when VM 108(1) is poweredoff and powered on respectively. For example, when VM 108(1) is poweredoff, VFM module 118(1) can save the data stored in VFM allocation 120(1)to backend storage 112 and subsequently free VFM allocation 120(1). WhenVM 108(1) is powered back on, VFM module 118(1) can create a new VFMallocation for VM 108(1) in flash storage device 116 and restore thepreviously saved data to the new VFM allocation. This creates theillusion that VFM device 122(1) is a physical, non-volatile memorydevice since, from the perspective of VM 108(1), the data stored in VFMdevice 122(1) persists across the VM power cycle.

In the embodiment where VFM module 118(1) considers VFM device 122(1) tobe a volatile memory device, VFM module 118(1) can simply free VFMallocation 120(1) upon VM power off and create a new VFM allocation forVM 108(1) in flash storage device 116 upon VM power on, without backingup the data in VFM allocation 120(1) to backend storage 112. Thiscreates the illusion that VFM device 122(1) is a physical, volatilememory device since, from the perspective of VM 108(1), the data storedin VFM device 122(1) is lost across the VM power cycle.

FIG. 5 depicts a flowchart 500 that provides a more detailed descriptionof the processing attributed to host system 102 in the VM power on flowof FIG. 2 according to an embodiment. At block 502, virtualizationsoftware 104 can receive, from CMS 110, a command to power on a VM(e.g., VM 108(1)). In response, virtualization software 104 caninstantiate a VMM (e.g., VMM 106(1)) and cause the VMM to initiate thepower on process for VM 108(1) (block 504).

At block 506, the VFM module included in VMM 106(1) (e.g., VFM module118(1)) can determine a VFM allocation size for VM 108(1). For example,VFM module 118(1) can determine this information from the .VMX file thatCMS 110 creates at the time of VM provisioning (as previously describedwith respect to FIG. 2). VFM module 118(1) can also determine the amountof available storage space in flash storage device 116 (block 508).

At block 510, VFM module 118(1) can check whether flash storage device116 has sufficient free space to accommodate the VFM allocation sizedetermined at block 506. If flash storage device 116 does not havesufficient free space, VFM module 118(1) can inform virtualizationsoftware 104, which can abort the VM power on process (block 512). Inone embodiment, the decision to abort the VM power on process at thisstage can be a policy decision that is controlled at per VM granularity.Virtualization software 104 can also notify CMS 110 that VM 108(1)cannot be powered on (block 514). CMS 110 may then attempt to deploy VM108(1) on a different host system.

On the other hand, if flash storage device 116 does have sufficient freespace, VFM module 118(1) can create, in flash storage device 116, a VFMallocation having the size determined at block 506 (e.g., VFM allocation120(1)) (block 516). In a particular embodiment, the created VFMallocation can correspond to a virtual disk file. In another embodiment,the created VFM allocation can be a block device that is carved out by alogical volume manager.

Once VFM module 118(1) has created VFM allocation 120(1), VFM module118(1)/VMM 106(1)/virtualization software 104 can take steps to surfaceVFM allocation 120(1) to VM 108(1) as a VFM device. In certainembodiments, VFM allocation 20(1) can be surfaced as a block-baseddevice (e.g., a virtual SCSI device). For example, at block 518, VFMmodule 118(1) can pass a handle for VFM allocation 120(1) to VMM 106(1),which can create a virtual SCSI device (e.g., VFM device 122(1))corresponding to VFM allocation 120(1). At block 520, virtualizationsoftware 104 can receive a SCSI inquiry command from VM 108(1) as partof the VM's boot-up procedure. Finally, at block 522, virtualizationsoftware 104 can send a SCSI inquiry response to VM 108(1) thatidentifies VFM device 122(1). In one embodiment, the SCSI inquiryresponse can include information that indicates to VM 108(1) that VFMdevice 122(1) is a flash-based device. In a further embodiment, the SCSIinquiry response can include information that indicates to VM 108(1)that VFM device 122(1) is configured to behave (from a VM lifecycleperspective) as either a non-volatile memory device or a volatile memorydevice.

FIGS. 6 and 7 depict flowcharts 600 and 700 respectively that provide amore detailed description of the processing attributed to host system102 in the VM suspend/snapshot and VM resume flows of FIGS. 3 and 4according to an embodiment. At block 602, virtualization software 104can receive, from CMS 110, a command to suspend, or create a snapshotof, VM 108(1). In response, virtualization software 104 can call VMM106(1) to initiate the VM suspend/snapshot process for VM 108(1) (block604).

As part of the suspend/snapshot process, VFM module 118(1) of VMM 106(1)can save the data stored in VFM allocation 120(1) to backend storage112. In certain embodiments, VFM module 118(1) can save the data to a VMimage file for VM 108(1) that is resident on backend storage 112 (block606). The VM image file can include, among other things, the RAM stateof VM 108(1). In other embodiments, VFM module 118(1) can save the datato an alternative location, such as in one of the virtual disks of VM108(1).

VFM module 118(1) can then free VFM allocation 120(1) (block 608). Thisstep can include deleting the file corresponding to VFM allocation120(1), or otherwise reclaiming the storage space associated with VFMallocation 120(1) in flash storage device 116 so that the space can beused again.

Turning now to FIG. 7, at block 702, virtualization software 104 canreceive, from CMS 110, a command to resume operation of suspended VM108(1). In response, virtualization software 104 can call VMM 106(1) toinitiate the VM resume process for VM 108(1) (block 704).

At blocks 706-710, VFM module 118(1) of VMM 106(1) can carry out stepsto determine whether flash storage device 116 had sufficient free spaceto accommodate a new VFM allocation for VM 108(1). In variousembodiments, blocks 706-710 can be substantially similar to blocks506-510 of FIG. 5. If flash storage device 116 does not have sufficientfree space, virtualization software 104 can abort the resume process andnotify CMS 110 that VM 108(1) cannot be resumed (blocks 712 and 714).CMS 110 may then attempt to migrate VM 108(1) to a different host systemwith sufficient flash storage space.

If flash storage device 116 does have sufficient free space, VFM module118(1) can create, in flash storage device 116, a new VFM allocationhaving substantially the same size as original VFM allocation 120(1)(e.g., VFM allocation 408(1)) (block 716). As part of this step, VFMmodule 118(1) can associate new VFM allocation 408(1) with previouslysurfaced VFM device 122(1). VFM module 118(1) can then restore the datasaved in backend storage 112 (per block 606 of FIG. 6) to new VFMallocation 408(1) (block 718), which allows VM 108(1) to access the datavia VFM device 122(1) upon completion of the resume process.

FIG. 8 depicts a flowchart 800 for powering off VM 108(1) when VFMdevice 122(1) of VFM 108(1) is configured to act as a volatile memorydevice (rather than a non-volatile memory device) according to anembodiment. As noted previously, this scenario requires differentprocessing than the VM suspend flow shown in FIGS. 3 and 6, since thedata stored in VFM device 122(1) should not persist across a VM powercycle.

At block 802, virtualization software 104 can receive, from CMS 110, acommand to power off VM 108(1). As used herein, the phrases “poweringoff a VM” and “VM power off” refer to causing the guest operating systemrunning within the VM to shut down.

At block 804, virtualization software 104 can call VMM 106(1) toinitiate the VM power off process for VM 108(1). As part of this poweroff process, VFM module 118(1) can free VFM allocation 120(1) in amanner that is substantially similar to block 608 of FIG. 6 (block 806).However, unlike FIG. 6, at block 806 VFM module 118(1) specificallyrefrains from saving the data stored in VFM allocation 120(1) to backendstorage 112 prior to freeing VFM allocation 120(1). This prevents thedata from being available to VM 108(1) when it is powered back on, andthus preserves the volatile memory semantics of VFM device 122(1).

In some embodiments, CMS 110 can migrate, or move, a VM that has asurfaced VFM device from one host system (i.e., a “source” host system)to another host system (i.e., a “destination” host system). In theseembodiments, the VFM modules resident on both the source and destinationhost systems can interoperate to ensure that the data associated withthe VFM device is correctly migrated from the source host-side flashstorage device to the destination host-side flash storage device. FIG. 9depicts a flowchart 900 of such a migration process.

At block 902, CMS 110 can initiate a migration of a VM from a sourcehost system to a destination host system. In one embodiment, CMS 110 caninitiate this migration process as a “live” process (i.e., while the VMis still running) using a technology such as vMotion developed byVMware, Inc.

At block 904, the VFM module for the VM at the destination host systemcan determine the amount of available space in the destination host-sideflash storage device. The destination VFM module can then determinewhether the amount of available space is sufficient to accommodate theentire contents of the VFM allocation for the VM on the source host side(block 906). If there is insufficient free space, the virtualizationsoftware on the destination host system can abort the VM migrationprocess and notify CMS 110 (blocks 908 and 910).

On the other hand, if there is sufficient free space in the destinationhost-side flash storage device, the destination VFM module can create anew VFM allocation in the destination host-side flash storage device andassociate the new VFM allocation with the migrated VM's VFM device(block 912). CMS 110 can then coordinate with the VFM modules at boththe source and destination host systems to copy over the data from thesource-side VFM allocation to the newly created destination-side VFMallocation (block 914). At the conclusion of this process, the migratedVM can access, via its VFM device, the same VFM data that it was able toaccess prior to the migration, since the destination-side VFM allocationcontains the same data as the source-side VFM allocation. In certainembodiments, the source-side VFM module can free the source-side VFMallocation once the migration is complete, which allows that sourcehost-side flash storage capacity to be reused.

The various embodiments described herein may employ variouscomputer-implemented operations involving data stored in computersystems. For example, these operations may require physical manipulationof physical quantities—usually, though not necessarily, these quantitiesmay take the form of electrical or magnetic signals, where they orrepresentations of them are capable of being stored, transferred,combined, compared, or otherwise manipulated. Further, suchmanipulations are often referred to in terms such as producing,identifying, determining, or comparing. Any operations described hereinthat form part of one or more embodiments may be useful machineoperations. In addition, one or more embodiments also relate to a deviceor an apparatus for performing these operations. The apparatus may bespecially constructed for specific required purposes, or it may be ageneral purpose computer selectively activated or configured by acomputer program stored in the computer. In particular, various generalpurpose machines may be used with computer programs written inaccordance with the teachings herein, or it may be more convenient toconstruct a more specialized apparatus to perform the requiredoperations. The various embodiments described herein may be practicedwith other computer system configurations including hand-held devices,microprocessor systems, microprocessor-based or programmable consumerelectronics, minicomputers, mainframe computers, and the like.

One or more embodiments may be implemented as one or more computerprograms or as one or more computer program modules embodied in one ormore non-transitory computer readable storage media. The termnon-transitory computer readable storage medium refers to any datastorage device that can store data which can thereafter be input to acomputer system. The non-transitory computer readable media may be basedon any existing or subsequently developed technology for embodyingcomputer programs in a manner that enables them to be read by acomputer. Examples of a non-transitory computer readable medium includea hard drive, network attached storage (NAS), read-only memory,random-access memory (e.g., a flash memory device), a CD (Compact Disc)(e.g., CD-ROM, CD-R, or CD-RW), a DVD (Digital Versatile Disc), amagnetic tape, and other optical and non-optical data storage devices.The non-transitory computer readable medium can also be distributed overa network coupled computer system so that the computer readable code isstored and executed in a distributed fashion.

In addition, while described virtualization methods have generallyassumed that virtual machines present interfaces consistent with aparticular hardware system, persons of ordinary skill in the art willrecognize that the methods described may be used in conjunction withvirtualizations that do not correspond directly to any particularhardware system. Virtualization systems in accordance with the variousembodiments, implemented as hosted embodiments, non-hosted embodiments,or as embodiments that tend to blur distinctions between the two, areall envisioned. Furthermore, various virtualization operations may bewholly or partially implemented in hardware.

Many variations, modifications, additions, and improvements arepossible, regardless the degree of virtualization. The virtualizationsoftware can therefore include components of a host, console, or guestoperating system that performs virtualization functions. Pluralinstances may be provided for components, operations, or structuresdescribed herein as a single instance. Finally, boundaries betweenvarious components, operations, and data stores are somewhat arbitrary,and particular operations are illustrated in the context of specificillustrative configurations. Other allocations of functionality areenvisioned and may fall within the scope of the invention(s). Ingeneral, structures and functionality presented as separate componentsin exemplary configurations may be implemented as a combined structureor component. Similarly, structures and functionality presented as asingle component may be implemented as separate components.

As used in the description herein and throughout the claims that follow,“a,” “an,” and “the” includes plural references unless the contextclearly dictates otherwise. Also, as used in the description herein andthroughout the claims that follow, the meaning of “in” includes “in” and“on” unless the context clearly dictates otherwise.

The above description illustrates various embodiments along withexamples of how aspects of particular embodiments may be implemented.The above examples and embodiments should not be deemed to be the onlyembodiments, and are presented to illustrate the flexibility andadvantages of particular embodiments as defined by the following claims.Based on the above disclosure and the following claims, otherarrangements, embodiments, implementations and equivalents may beemployed without departing from the scope hereof as defined by theclaims.

What is claimed is:
 1. A method for surfacing host-side flash storagecapacity to a virtual machine (VM) configured to run on a host system,the method comprising: creating, for the VM, a flash storage spaceallocation in a flash storage device that is locally attached to thehost system; causing, by the host system, the flash storage spaceallocation to be accessible to the VM as a virtual flash memory device;receiving, by the host system, a request to suspend, or create asnapshot of, the VM; and in response to the request: saving data in theflash storage space allocation to a backend storage device; and freeingthe flash storage space allocation.
 2. The method of claim 1 wherein thefreeing comprises reclaiming storage space in the flash storage devicecorresponding to the flash storage space allocation for use by anotherVM.
 3. The method of claim 1 further comprising, upon receiving arequest to resume operation of the VM: creating, for the VM, a new flashstorage space allocation in the flash storage device, the new flashstorage space allocation having substantially the same size as the freedflash storage space allocation; copying the data saved in the backendstorage device to the new flash storage space allocation; andsubsequently to the copying, resuming the VM.
 4. The method of claim 3further comprising, prior to creating the new flash storage spaceallocation: determining whether the flash storage device has sufficientfree storage space to accommodate the new flash storage spaceallocation; and if the flash storage device does not have sufficientfree storage space, migrating the VM to another host system that isdetermined to have sufficient free storage space within itslocally-attached flash storage to accommodate the new flash storagespace allocation.
 5. The method of claim 1 wherein the virtual flashmemory device is configured to act as a volatile memory device.
 6. Themethod of claim 5 further comprising: receiving a request to power-offthe VM; and in response to the request to power-off the VM, freeing theflash storage space allocation without saving the data in the flashstorage space allocation to the backend storage device.
 7. The method ofclaim 5 wherein the virtual flash memory device is configured to act asa volatile memory device based on a parameter that is defined by a userat a time of provisioning the VM.
 8. A non-transitory computer readablemedium having stored thereon program code executable by a processor of ahost system, the program code embodying a method for surfacing host-sideflash storage capacity to a virtual machine (VM) configured to run onthe host system, the method comprising: creating, for the VM, a flashstorage space allocation in a flash storage device that is locallyattached to the host system; causing the flash storage space allocationto be accessible to the VM as a virtual flash memory device; receiving arequest to suspend, or create a snapshot of, the VM; and in response tothe request: saving data in the flash storage space allocation to abackend storage device; and freeing the flash storage space allocation.9. The non-transitory computer readable medium of claim 8 wherein thefreeing comprises reclaiming storage space in the flash storage devicecorresponding to the flash storage space allocation for use by anotherVM.
 10. The non-transitory computer readable medium of claim 8 whereinthe method further comprises, upon receiving a request to resumeoperation of the VM: creating, for the VM, a new flash storage spaceallocation in the flash storage device, the new flash storage spaceallocation having substantially the same size as the freed flash storagespace allocation; copying the data saved in the backend storage deviceto the new flash storage space allocation; and subsequently to thecopying, resuming the VM.
 11. The non-transitory computer readablemedium of claim 10 wherein the method further comprises, prior tocreating the new flash storage space allocation: determining whether theflash storage device has sufficient free storage space to accommodatethe new flash storage space allocation; and if the flash storage devicedoes not have sufficient free storage space, migrating the VM to anotherhost system that is determined to have sufficient free storage spacewithin its locally-attached flash storage to accommodate the new flashstorage space allocation.
 12. The non-transitory computer readablemedium of claim 8 wherein the virtual flash memory device is configuredto act as a volatile memory device.
 13. The non-transitory computerreadable medium of claim 12 wherein the method further comprises:receiving a request to power-off the VM; and in response to the requestto power-off the VM, freeing the flash storage space allocation withoutsaving the data in the flash storage space allocation to the backendstorage device.
 14. The non-transitory computer readable medium of claim12 wherein the virtual flash memory device is configured to act as avolatile memory device based on a parameter that is defined by a user ata time of provisioning the VM.
 15. A host system comprising: aprocessor; a locally-attached flash storage device; and a non-transitorycomputer readable storage medium having stored thereon program codethat, when run by the processor, causes the processor to: create, for avirtual machine (VM) configured to run on the host system, a flashstorage space allocation in the locally-attached flash storage device;make the flash storage space allocation accessible to the VM as avirtual flash memory device; receive a request to suspend, or create asnapshot of, the VM; and in response to the request: save data in theflash storage space allocation to a backend storage device; and free theflash storage space allocation.
 16. The host system of claim 15 whereinthe program code that causes the processor to free the flash storagespace allocation comprises program code that causes the processor toreclaim storage space in the locally-attached flash storage devicecorresponding to the flash storage space allocation for use by anotherVM.
 17. The host system of claim 15 wherein the program code furthercauses the processor to, upon receiving a request to resume operation ofthe VM: create, for the VM, a new flash storage space allocation in thelocally-attached flash storage device, the new flash storage spaceallocation having substantially the same size as the freed flash storagespace allocation; copy the data saved in the backend storage device tothe new flash storage space allocation; and subsequently to the copying,resume the VM.
 18. The computer system of claim 17 wherein the programcode further causes the processor to, prior to creating the new flashstorage space allocation: determine whether the locally-attached flashstorage device has sufficient free storage space to accommodate the newflash storage space allocation; and if the locally-attached flashstorage device does not have sufficient free storage space, migrate theVM to another host system that is determined to have sufficient freestorage space within its locally-attached flash storage to accommodatethe new flash storage space allocation.
 19. The computer system of claim15 wherein the virtual flash memory device is configured to act as avolatile memory device.
 20. The computer system of claim 19 wherein theprogram code further causes the processor to: receive a request topower-off the VM; and in response to the request to power-off the VM,free the flash storage space allocation without saving the data in theflash storage space allocation to the backend storage device.
 21. Thecomputer system of claim 19 wherein the virtual flash memory device isconfigured to act as a volatile memory device based on a parameter thatis defined by a user at a time of provisioning the VM.